import { createSlice } from '@reduxjs/toolkit';
const counterSlice = createSlice({
    name: 'counter',
    initialState: {
        num: 12,
        hi: 2,
    },
    reducers: {
        add(state, actions) {
            state.num = actions.payload;
        },
    },
});
export const { add } = counterSlice.actions;
export default counterSlice.reducer;
